package com.dingreading.cloud.web.service.impl;

import com.dingreading.cloud.web.entity.table.WebImageTableDef;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.dingreading.cloud.web.entity.WebImage;
import com.dingreading.cloud.web.mapper.WebImageMapper;
import com.dingreading.cloud.web.service.WebImageService;
import org.springframework.stereotype.Service;

/**
 *  服务层实现。
 *
 * @author Administrator
 * @since 2024-11-14
 */
@Service
public class WebImageServiceImpl extends BaseServiceImpl<WebImageMapper, WebImage, WebImageTableDef> implements WebImageService {

    @Override
    protected WebImageTableDef getTable() {
        return WebImageTableDef.webImage;
    }

    @Override
    public WebImage getByType(String type) {
        return getMapper().selectOneByCondition(table.type.eq(type));
    }

}
